<template>
	<view class="viewfill" @tap="curId=''">
		<u-navbar :isBack="false" :border-bottom="false">
			<view class="u-flex u-row-between u-flex-1 u-p-x-30">
				<view class="">
					<text class="u-font-38 text-bold">发现</text>
				</view>
				</view>

		</u-navbar>
    <view class="setting-card" v-for="item,index in data"   @click="findQuan(item)">
      <view class="setting-card-content">
        <image class="setting-card-icon" style="width: 70rpx;" mode="widthFix" :src="item.cssClass"></image>
        <text class="setting-card-text" style="font-size: 34rpx;"  >{{item.dictLabel}}</text>
      </view>
      <image class="setting-card-arrow" src="@/static/images/rightsection.png"></image>
    </view>
	<!-- <view class="setting-card"   @click="datawang">
	  <view class="setting-card-content">
	    <image class="setting-card-icon" src="@/static/images/sys.png"></image>
	    <text class="setting-card-text">百度一下</text>
	  </view>
	  <image class="setting-card-arrow" src="@/static/images/rightsection.png"></image>
	</view> -->
	</view>
</template>

<script>
	import {getDict} from "@/api/system.js"
	export default {
		data(){
			return {
				data:[]
			}
		},
	async	mounted(){
				// getDict('cat_show_withdrawal_method').then((list)=>{
					const res=await 	getDict('httpType');
					this.data=res;
					console.log(this.data)
				// }
		},
		methods:{
			findQuan(item){
				console.log(item.dictValue)
				const url =item.dictValue
				if(item.isDefault=='Y'){
					plus.runtime.openURL(url);
				}
				else{
					uni.navigateTo({
						url:'/pages/find/webview?url='+url
					})
					
				}
			
			},
			datawang(){
				 if (typeof plus !== 'undefined') {
				        plus.runtime.openURL('https://www.baidu.com/');
				      } else {
				        console.log('plus对象不存在，无法在App端直接打开URL');
				      }
			}
		}
	}

</script>

<style lang="scss" scoped>
	.viewfill{
		min-height: calc(100vh - 100rpx);
	}
	.setting-card {
	  display: flex;
	  justify-content: space-between;
	  align-items: center;
	  padding: 25rpx 20rpx;
	  margin: 20rpx 20rpx ;
	  background-color: #fff;
	  border-radius: 16rpx;
	  height: 130rpx;
	}
	
	.setting-card-content {
	  display: flex;
	  align-items: center;
	}
	
	.setting-card-icon {
	  width: 40rpx;
	  height: 40rpx;
	  margin-right: 20rpx;
	}
	
	.setting-card-text {
	  font-size: 28rpx;
	  color: #333;
	}
	
	.setting-card-arrow {
	  width: 24rpx;
	  height: 24rpx;
	}
</style>
